// Wait for Cordova to load
//
document.addEventListener("deviceready", onDeviceReady, false);

// Cordova is ready
//
function onDeviceReady() {
	// Empty
}

// alert dialog dismissed
function alertDismissed() {
	// This will occur after confirming the winner alert
	alert("You've clicked Done");
}

// Show a custom alert
//
function showAlert() {
	navigator.notification.alert('You are the winner!', // message
	alertDismissed, // callback
	'Game Over', // title
	'Done' // buttonName
	);
}